package com.meng.rxjava;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

import com.meng.rxjava.presenter.MainPresenter;
import com.meng.rxjava.presenter.MainPresenterImp;
import com.meng.rxjava.view.MainView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity implements MainView{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        List<String> lists = new ArrayList<>();
        lists.add("abc1.txt");
        lists.add("abc2.avi");

        lists.add("abc3.img");
        lists.add("abc4.png");
        lists.add("abc5.exe");
        lists.add("abc6.sql");
        lists.add("abc7.txt");
        lists.add("abc8.txt");
        Toast.makeText(this, "test", Toast.LENGTH_SHORT).show();
        MainPresenter presenter = new MainPresenterImp(this);
        presenter.getContent("http://www.baidu.com");

    }

    @Override
    public void show(String content) {
        Toast.makeText(this, content+"萌萌", Toast.LENGTH_SHORT).show();
    }
}
